#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int  a, b, c;
	
	
		for (int x = 10; x < 100; x++)
		{
			a = x % 10;
			if (x == a * a)
			{
				printf("%d\n", x);
			}
		}
		for (int y = 100; y < 1000; y++)
		{
			int b;
			b = y % 100;
			if (y == b * b)
			{
				printf("%d\n", y);
			}
		}
			for (int z = 1000; z < 10000; z++)
			{
				int c;
				c = z % 1000;
				if (z == c * c)
				{
					printf("%d\n", z);
				}
		    }
		
	
	return 0;
}